<admintpl file="header" />
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a>收工指派管理</a></li>
    </ul>
    <form class="well form-search" method="post" action="{:U('Bdrunpeople/hand_appoint')}">
        派单员姓名：<input type="text" name="appoint[dis_name]" style="width: 60px;" value="{$appoint.dis_name}"><!--  placeholder="请输入..." -->
        电话：<input type="text" name="appoint[mobile]" style="width: 85px;" value="{$appoint.mobile}"><!--  placeholder="请输入..." -->
        所属团队：
        <select class="select_2" name="appoint[company_id]"  style="width: 105px;" >
            <volist name="company_data" id="vo">
                <if condition="$appoint[company_id] == $vo[company_id]">
                <option value="{$vo[company_id]}" selected>{$vo[company_name]}</option>
                    <else /><option value="{$vo[company_id]}" >{$vo[company_name]}</option>
                </if>
            </volist>
        </select>
        <input type="submit" class="btn btn-primary" value="搜索" />
        <input type="hidden" name="id" value="{$order.order_id}">
    </form>
    <form method="post" class="js-ajax-form">
        <table class="table table-hover table-bordered">
            <thead>
            <tr>
                <th align="center">序号</th>
                <th>所属团队</th>
                <th>{:L('JOB_NUMBER')}</th>
                <th>{:L('DISPATCH_NAME')}</th>
                <th>电话</th>
                <th>{:L('DISPATCH_LEVEL')}</th>
                <th>位置更新时间</th>
                <th>维度</th>
                <th>经度</th>
                <th align="center">{:L('ACTIONS')}</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="dispatchs" item="vo" key="k">
                <tr>
                    <td align="center">{$k+1}</td>
                    <td>{$vo['company_id']|getCompanyName}</td>
                    <td>{$vo['job_number']}</td>
                    <td>{$vo['dispatch_name']}</td>
                    <td>{$vo['mobile']}</td>
                    <td>{$vo['dispatch_level_id']|getPnLevel}</td>
                    <td>{$vo['place_up_time']}</td>
                    <td>{$vo['latitude']}</td>
                    <td>{$vo['longitude']}</td>
                    <td align="center">
                         <a class="btn btn-primary btn-small js-dialog_close" href="{:U('bdrunpeople/hand_appoint_post',array('dispatch_id'=>$vo['dispatch_id'],'voucher_no'=>$order['voucher_no'],'order_id'=>$order['order_id'],'formget'=>$formget))}">手工指派</a>
                    </td>
                </tr>

            </foreach>
            </tbody>
        </table>
        <if condition="empty($dispatchs)">
            <div style="padding: 30px;text-align: center;color: #999999">
                <i class="fa fa-database" style="font-size: 38px"></i><br />
                暂无数据
            </div>
        </if>

        <div class="pagination">{$page}</div>
        <input type="hidden" name="id" value="{$order.order_id}">
    </form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
<script>
    setCookie('refersh_time', 0);
    function refersh_window() {
        var refersh_time = getCookie('refersh_time');
        if (refersh_time == 1) {
            window.location = "{:U('Bdrunpeople/user',$formget)}";
        }
    }
    setInterval(function() {
        refersh_window();
    }, 2000);
    $(function() {
        setCookie("refersh_time", 0);
        Wind.use('ajaxForm', 'artDialog', 'iframeTools', function() {
            //批量移动
            $('.js-articles-move').click(function(e) {
                var str = 0;
                var id = tag = '';
                $("input[name='ids[]']").each(function() {
                    if ($(this).attr('checked')) {
                        str = 1;
                        id += tag + $(this).val();
                        tag = ',';
                    }
                });
                if (str == 0) {
                    art.dialog.through({
                        id : 'error',
                        icon : 'error',
                        content : '您没有勾选信息，无法进行操作！',
                        cancelVal : '关闭',
                        cancel : true
                    });
                    return false;
                }
                var $this = $(this);
            });
        });

    });
</script>
</body>
</html>